function a(){
    return new Promise(function(resolve, reject){
        setTimeout(function(){
            console.log('a');
            //resolve('a执行完毕');
            resolve('a执行失败');
        }, 1000);
    });
}
a().then(res =>{
    console.log(res);
    
})
.catch(err =>{
    console.log(err);  
})